<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditParticipantsTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditParticipantsLabel_invitationId}" for="invitationId" />
                    <h:selectOneMenu id="invitationId" value="#{participantsController.selected.invitationId}" title="#{bundle.EditParticipantsTitle_invitationId}" required="true" requiredMessage="#{bundle.EditParticipantsRequiredMessage_invitationId}">
                        <f:selectItems value="#{invitationsController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditParticipantsLabel_users}" for="users" />
                    <h:selectOneMenu id="users" value="#{participantsController.selected.users}" title="#{bundle.EditParticipantsTitle_users}" required="true" requiredMessage="#{bundle.EditParticipantsRequiredMessage_users}">
                        <f:selectItems value="#{usersController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.EditParticipantsLabel_events}" for="events" />
                    <h:selectOneMenu id="events" value="#{participantsController.selected.events}" title="#{bundle.EditParticipantsTitle_events}" required="true" requiredMessage="#{bundle.EditParticipantsRequiredMessage_events}">
                        <f:selectItems value="#{eventsController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{participantsController.update}" value="#{bundle.EditParticipantsSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditParticipantsViewLink}"/>
                <br />
                <h:commandLink action="#{participantsController.prepareList}" value="#{bundle.EditParticipantsShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditParticipantsIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
